<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="C" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>

<!DOCTYPE HTML >
<html>
<head>

    <title>My JSP 'Personal.jsp' starting page</title>
    <meta charset="utf-8"/>
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="This is my page">
    <!--favicon-->
    <link rel="icon" href="assets/images/favicon.ico" type="image/x-icon">
    <!-- simplebar CSS-->
    <link href="assets/plugins/simplebar/css/simplebar.css" rel="stylesheet"/>
    <!-- Bootstrap core CSS-->
    <link href="assets/css/bootstrap.min.css" rel="stylesheet"/>
    <link href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">

    <!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
    <script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>

    <!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
    <script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
    <!-- animate CSS-->
    <link href="assets/css/animate.css" rel="stylesheet" type="text/css"/>
    <!-- Icons CSS-->
    <link href="assets/css/icons.css" rel="stylesheet" type="text/css"/>
    <!-- Sidebar CSS-->
    <link href="assets/css/sidebar-menu.css" rel="stylesheet"/>
    <!-- Custom Style-->
    <link href="assets/css/app-style.css" rel="stylesheet"/>

    <link rel="stylesheet" href="assets/css/style.css">
    <!--
    <link rel="stylesheet" type="text/css" href="styles.css">
    -->

</head>

<body>
<div class="wrapper">
    <div class="profile-card js-profile-card">
        <div class="profile-card__img" style="opacity: 0;">
            <!--<img src="./translateelement/Başlıksız-1.jpg" alt="个人资料卡">-->
        </div>

        <div class="profile-card__cnt js-profile-cnt">
            <div class="profile-card__name">
                <font style="vertical-align: inherit;">
                    <font style="vertical-align: inherit;">${tea.tname}${stu.sname}</font>
                </font>
            </div>
            <div class="profile-card-loc">
								<span class="profile-card-loc__icon">
					<!--<svg class="icon"><use xlink:href="#icon-location"></use></svg>-->
					联系电话：
				</span>
                <span class="profile-card-loc__txt"><font style="vertical-align: inherit;"><font
                        style="vertical-align: inherit;">${tea.tel}${stu.tel}</font></font></span>
            </div>

            <div class="profile-card-ctr">
                <button class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal">修改</button>
                <!-- 模态框（Modal） -->
                <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
                     aria-hidden="true">
                    <div class="modal-dialog">
                        <div class="modal-content">
                            <div class="modal-header">
                                <h4 class="modal-title" id="myModalLabel">修改个人信息</h4>
                                <%--												<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>  关闭页面--%>

                            </div>
                            <div class="modal-body">
                                <c:choose>
                                    <c:when test="${tea!=null}">
                                        <form action="updateteacher" method="post">
                                            <input type="hidden" name="tno" value="${tea.tno}">
                                            <input name="tname" class="form-control" type="text" value="${tea.tname}"
                                                   readonly="readonly">
                                            <input name="tel" class="form-control" type="tel" value="${tea.tel}"
                                                   placeholder="请输入电话号码">
                                            <button type="submit">提交</button>
                                        </form>
                                    </c:when>
                                    <c:otherwise>
                                        <form action="updateStu" method="post">
                                            <input type="hidden" name="stno" value="${stu.stno}">
                                            <input name="sname" class="form-control" type="text" value="${stu.sname}"
                                                   readonly="readonly">
                                            <input name="tel" class="form-control" type="tel" value="${stu.tel}"
                                                   placeholder="请输入电话号码">
                                            <button type="submit">提交</button>
                                        </form>
                                    </c:otherwise>
                                </c:choose>
                            </div>
                            <div class="modal-footer">
                                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                            </div>
                        </div><!-- /.modal-content -->
                    </div><!-- /.modal -->
                </div>


                </a>
            </div>
        </div>

    </div>

</div>


</body>
</html>

